#ifndef MUSICSLIDER_H
#define MUSICSLIDER_H

#include <QWidget>
#include <QMouseEvent>
namespace Ui {
class MusicSlider;
}

class MusicSlider : public QWidget
{
    Q_OBJECT

public:
    explicit MusicSlider(QWidget *parent = nullptr);
    ~MusicSlider();
    void moveSlider();

    //重写鼠标按下，松开，按下移动的函数
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);

    void setStep(float bf);


signals:
    void setMusicSilderPosition(float);


;
private:
    Ui::MusicSlider *ui;
    int currentPos;
};

#endif // MUSICSLIDER_H
